<?php

namespace app\admin\model;

use app\admin\model\system\SystemDeptLeader;
use app\admin\model\system\SystemUser;
use app\common\basic\BaseModel;

/**
 * 公司管理账号模型
 */
class CompanyUser extends BaseModel
{
    /**
     * 数据表主键
     * @var string
     */
    protected $pk = 'id';
    protected $table = 'vk_company_user';
    
    public function searchUsernameAttr($query, $value)
    {
        return $query->whereLike('username', "%$value%");
    }
    
    public function searchEmailAttr($query, $value)
    {
        return $query->whereLike('email', "%$value%");
    }
    
    public function searchPhoneAttr($query, $value)
    {
        return $query->whereLike('phone', "%$value%");
    }
    
    
}